Update table data
With this function you can update table data quickly. It is intended for updating fields in records of a table that can be selected via a "where condition". For example this could be useful when you have to update fields in tables where neither a possibility via table maintenance nor an update via transport request is given (think of tables like MARA, ANLA etc.).
Specify the table, the fields and the new values of these fields. You can specify multiple fields, for each of them a new value has to be given in the text area in the right.
The small "i" button right from the input field for the table offers a list of the table fields. A doubleclick on a line transfers the field name and a value pattern to the dialog form. You can use this for the "Update fields with values" input fields as well as for the input field of the "where condition" (depending on where the cursor was placed before pressing the "i" button)
You can also enter the field names manually. The specified field names are checked against the SAP data dictionary. But for offering as much flexibility as possible this input is not checked whether it is syntactically correct:
- the values to be assigned to the given fields
- the "where condition"
So please enter the values and the "where condition" carefully and syntactically correct - otherwise the update statement will fail or will not have the result you want. New values that are to be assigned to non-numeric fields have to be specified in (single) quotation marks. There is no check whether the new values fit to what is specified for valid values in the SAP system (for example via value tables or plausibility checks in the SAP application logic). If you specify wrong values, either the update will fail (in case you have chosen the wrong format) or the data will be corrupted / invalid (in case you have specified values which cause that the SAP application will not work properly anymore). Keep in mind that the fields of a primary key can not be manipulated via an "update" statement.
The "where condition" is optional. In case you leave it empty the update will be done for every record of the specified client in the table.
In the "Preview" text area you can see the update statement that is built from your input. Have a look at it and check if it would do what you intended. Some basic knowledge about SQL and it's implementation in the ABAP programming language is strongly recommended!
It is also strongly recommended that you do a test in a test / quality system to ensure that the update works in the way you want to! This function is highly critical from security and data consistency point of view. Handle it with care and know exactly what you do, please! If the need for updating table data is more complex, you better should create a specific update program and use the function "Insert / modify a program".
If you do not set a flag in the "With SAPGUI" field, also system users (type 'B' or 'C') can be used. In case you set the flag "With SAPGUI" a dialog session will be started and after the execution you will see a short log with information about the number of updated records.
|